package com.sv.zgydor.pojo.pg;

import javax.persistence.*;

/**
 * Class summary
 * User: kevin
 * Date: 2017/09/23
 * Time: 21:16
 * Description:
 */
@Entity
@Table(name = "table2", catalog = "\"dgor-dsg\"")
public class Table2Entity {
    private Long id2;
    private String name2;

    @Id
    @Column(name = "id2")
    public Long getId2() {
        return id2;
    }

    public void setId2(Long id2) {
        this.id2 = id2;
    }

    @Basic
    @Column(name = "name2")
    public String getName2() {
        return name2;
    }

    public void setName2(String name2) {
        this.name2 = name2;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        Table2Entity that = (Table2Entity) o;

        if (id2 != null ? !id2.equals(that.id2) : that.id2 != null) return false;
        if (name2 != null ? !name2.equals(that.name2) : that.name2 != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = id2 != null ? id2.hashCode() : 0;
        result = 31 * result + (name2 != null ? name2.hashCode() : 0);
        return result;
    }
}
